import { ArticleService } from '../../../services'
const ArticleList = {
  namespaced: true,
  state: {
    allArticleList: []
  },
  mutations: {
    setAllArticleList(state, payload) {
      state.allArticleList[payload.id] = payload.content
    }
  },
  actions: {
    async getNowArticleList({ commit }, payload) {
      const res = await ArticleService.getLabelCosArtList(payload)
      console.log(res.data)
      commit('setAllArticleList', {
        id: payload.labelId,
        content: res.data.result
      })
    }
  }
}

export default ArticleList
